﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Calculate calculate = new Calculate();
            Add add = new Add();
            Multiply multiply = new Multiply();
            Subtraction subtraction = new Subtraction();
            Division division = new Division();

            
            Console.WriteLine("请输入运算符");
            string symbol = Console.ReadLine();
            

            switch (symbol)
            {
                case "+":
                    Console.WriteLine("请输入第一个数字");
                    add.Num1 = int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入第二个数字");
                    add.Num2 = int.Parse(Console.ReadLine());
                    add.DisplayResult();
                    break;
                case "-":
                    Console.WriteLine("请输入第一个数字");
                    subtraction.Num1 = int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入第二个数字");
                    subtraction.Num2 = int.Parse(Console.ReadLine());
                    subtraction.DisplayResult();
                    break;
                case "*":
                    Console.WriteLine("请输入第一个数字");
                    multiply.Num1 = int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入第二个数字");
                    multiply.Num2 = int.Parse(Console.ReadLine());
                    multiply.DisplayResult();
                    break;
                case "/":
                    Console.WriteLine("请输入第一个数字");
                    division.Num1 = int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入第二个数字");
                    division.Num2 = int.Parse(Console.ReadLine());
                    division.DisplayResult();
                    break;
                default:
                    break;
            }


        }
    }
}
